/**
 * 
 */
package com.uuticketweb.ticket.manager.bean;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

/**
 * @author stephen
 *
 */
public class Policy {
	public static final String TABLE_NAME = "policy";
	public static final String COLUMN_ID = "id";
	public static final String COLUMN_POLICY_NO = "POLICY_NO";
	public static final String COLUMN_START_DATE = "START_DATE";
	public static final String COLUMN_END_DATE = "EDN_DATE";
	public static final String COLUMN_CARRIER_CODE = "CARRIER_CODE";
	public static final String COLUMN_PASSENGER_TYPE = "PASSENGER_TYPE";

	private int id;
	private String policyNo;
	private String startDate;
	private String endDate;
	private String carrierCode;
	private String passengerType;
	private String allRelateFlag;
	private List<String> relationPolicy = new ArrayList<String>();

	public Policy(){}

	public Policy(ResultSet rs) throws SQLException {
		this.id = rs.getInt(COLUMN_ID);
		this.policyNo = rs.getString(COLUMN_POLICY_NO);
		this.startDate = rs.getString(COLUMN_START_DATE);
		this.endDate = rs.getString(COLUMN_END_DATE);
		this.carrierCode = rs.getString(COLUMN_CARRIER_CODE);
		this.passengerType = rs.getString(COLUMN_PASSENGER_TYPE);
	}
	/**
	 * @return the endDate
	 */
	public String getEndDate() {
		return endDate;
	}
	/**
	 * @param endDate the endDate to set
	 */
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the passengerType
	 */
	public String getPassengerType() {
		return passengerType;
	}
	/**
	 * @param passengerType the passengerType to set
	 */
	public void setPassengerType(String passengerType) {
		this.passengerType = passengerType;
	}
	/**
	 * @return the policyNo
	 */
	public String getPolicyNo() {
		return policyNo;
	}
	/**
	 * @param policyNo the policyNo to set
	 */
	public void setPolicyNo(String policyNo) {
		this.policyNo = policyNo;
	}
	/**
	 * @return the startDate
	 */
	public String getStartDate() {
		return startDate;
	}
	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	/**
	 * @return the allRelateFlag
	 */
	public String getAllRelateFlag() {
		return allRelateFlag;
	}

	/**
	 * @param allRelateFlag the allRelateFlag to set
	 */
	public void setAllRelateFlag(String allRelateFlag) {
		this.allRelateFlag = allRelateFlag;
	}

	/**
	 * @return the carrierCode
	 */
	public String getCarrierCode() {
		return carrierCode;
	}

	/**
	 * @param carrierCode the carrierCode to set
	 */
	public void setCarrierCode(String carrierCode) {
		this.carrierCode = carrierCode;
	}

	/**
	 * @return the relationPolicy
	 */
	public List<String> getRelationPolicy() {
		return relationPolicy;
	}

	/**
	 * @param relationPolicy the relationPolicy to set
	 */
	public void setRelationPolicy(List<String> relationPolicy) {
		this.relationPolicy = relationPolicy;
	}

}
